<template>
  <page-header-wrapper>
    <a-card :bordered="false" class="card_top_padding" style="margin-bottom: 11px;padding-top:14px;">
      <div class="table-page-search-wrapper">
        <a-form layout="inline">
          <a-row :gutter="20">
            <a-col :md="4" :sm="24">
              <a-form-item>
                <a-input-search v-model="queryParam.name" placeholder="请输入用户昵称/用户名" />
              </a-form-item>
            </a-col>
            <a-col :md="4" :sm="24">
              <a-form-item>
                <a-input-search v-model="queryParam.phone" placeholder="请输入手机号" />
              </a-form-item>
            </a-col>
            <!-- <a-col :md="5" :sm="24">
              <a-form-item label="用户类型">
                <a-select v-model="queryParam.useStatus" placeholder="请选择" default-value="0">
                  <a-select-option value="0">全部</a-select-option>
                  <a-select-option value="1">关闭</a-select-option>
                  <a-select-option value="2">运行中</a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="5" :sm="24">
              <a-form-item label="来源平台">
                <a-select v-model="queryParam.platform" placeholder="请选择" default-value="1">
                  <a-select-option value="0">微信</a-select-option>
                  <a-select-option value="1">支付宝</a-select-option>
                  <a-select-option value="3">手机</a-select-option>
                </a-select>
              </a-form-item>
            </a-col> -->
            <a-col :md="6" :sm="24">
              <span class="table-page-search-submitButtons" style="margin-bottom:0">
                <a-button style="margin-right: 8px" @click="() => (this.queryParam = {})">重置</a-button>
                <a-button type="primary" @click="onPageSearch">查询</a-button>
              </span>
            </a-col>
          </a-row>
        </a-form>
      </div>
    </a-card>
    <a-card :bordered="false" style="margin-top: 10px">
      <UserManage :queryParam="queryParam" ref="userManage" v-show="currentTab=='userManage'"></UserManage>
      <!-- <div slot="tabBarExtraContent">
        <a-space class="table-operator">
          <a-button type="primary" style="margin-bottom: 0px" @click="onExport" icon="plus">批量导出</a-button>
        </a-space>
      </div> -->
    </a-card>
  </page-header-wrapper>
</template>

<script>
import UserManage from './components/List'
export default {
  components: {
    UserManage,
  },
  props: {},
  data () {
    return {
      queryParam: {},
      currentTab: 'userManage'
    }
  },
  computed: {},
  watch: {
    currentTab (val) {
      this.$nextTick(() => {
        this.$refs[val].$refs.table.refresh(true)
      })
    }
  },
  methods: {
    onPageSearch () {
      this.$nextTick(() => {
        this.$refs[this.currentTab].$refs.table.refresh(true)
      })
    }
  }
}
</script>

<style scoped>
</style>
